package com.recharge.common.util;

import org.apache.shiro.crypto.hash.SimpleHash;

public class PasswordUtil {

    /**
     * 账户密码加密
     * @param username
     * @param pwd
     * @return
     */
    public static String getPassword(String password, String salt) {
        String hashAlgorithmName = "MD5";//加密方式
        Object crdentials = password;//密码原值
        int hashIterations = 1024;//加密1024次
        return new SimpleHash(hashAlgorithmName,crdentials,salt,hashIterations).toString();

    }
}
